package com.itheima.service;

import com.itheima.domain.User;
import com.itheima.mapper.UserMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;


@Transactional
@Service(interfaceClass = UserService.class,timeout = 60000)

public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    public String sayHello() {
        System.out.println("UserServiceImpl CALLED ======> sayHello, " + new Date());
        return "hello dubbo";
    }


    public User findByUserNameAndPwd(String username, String password) {
        return userMapper.findByUserNameAndPwd(username,password);
    }
}
